/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * RegistroCliente.java
 *
 * Created on 08/01/2012, 03:13:19 AM
 */
package sst.Vistas;

//import com.mysql.jdbc.PreparedStatement;
import java.awt.Frame;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import sst.Vistas.Principal;

/**
 *
 * @author alberto
 */
public class RegistroCliente extends javax.swing.JDialog {

    public PreparedStatement consulta, consulta2;
    public PreparedStatement consul;
    Connection con;

    /** Creates new form RegistroCliente */
    public RegistroCliente(java.awt.Frame parent, boolean modal) throws SQLException {
        super(parent, modal);


        try {
            Class.forName("com.mysql.jdbc.Driver");
            String URL = "jdbc:mysql://localhost/sst";
            con = DriverManager.getConnection(URL, "root", "alberto.1990");
            initComponents();
            this.setDefaultCloseOperation(this.DISPOSE_ON_CLOSE);
            setLocationRelativeTo(null);
            //ConexionDB con = new ConexionDB();
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(RegistroCliente.class.getName()).log(Level.SEVERE, null, ex);
        }
        textRif.setEnabled(true);
        textNombre.setEnabled(false);
        textTelefono.setEnabled(false);
        textDireccion.setEnabled(false);
        textCorreo.setEnabled(false);
    }

    public RegistroCliente(java.awt.Frame parent, boolean modal, String rif, String nombre, String telefono, String direccion, String correo) {
        super(parent, modal);
        String rif1 = rif;
        String nombre1 = nombre;
        String direccion1 = direccion;
        String telefono1 = telefono;
        String correo1 = correo;
        //System.out.print(rif1 + nombre1 + correo1+ direccion1);
        initComponents();
       // this.setDefaultCloseOperation(this.DISPOSE_ON_CLOSE);
        setLocationRelativeTo(null);
        this.setDefaultCloseOperation(this.DISPOSE_ON_CLOSE);
        textRif.setText(rif1);
        textNombre.setText(nombre1);
        textDireccion.setText(direccion1);
        textTelefono.setText(telefono1);
        textCorreo.setText(correo1);
        try {
            Class.forName("com.mysql.jdbc.Driver");
            String URL = "jdbc:mysql://localhost/sst";
            con = DriverManager.getConnection(URL, "root", "alberto.1990");
            initComponents();
            this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
            setLocationRelativeTo(null);



            //ConexionDB con = new ConexionDB();

        } catch (SQLException ex) {
            Logger.getLogger(RegistroCliente.class.getName()).log(Level.SEVERE, null, ex);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(RegistroCliente.class.getName()).log(Level.SEVERE, null, ex);
        }
        textRif.setEnabled(true);
        textNombre.setEnabled(false);
        textTelefono.setEnabled(false);
        textDireccion.setEnabled(false);
        textCorreo.setEnabled(false);

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        textRif = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        textTelefono = new javax.swing.JTextField();
        textNombre = new javax.swing.JTextField();
        textCorreo = new javax.swing.JTextField();
        textDireccion = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        botonGuardar = new javax.swing.JButton();
        botonGenerar = new javax.swing.JButton();
        botonSalir = new javax.swing.JButton();
        jLabel7 = new javax.swing.JLabel();
        botonBuscar = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        botonActualizar = new javax.swing.JButton();

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        jLabel1.setFont(new java.awt.Font("Droid Sans", 1, 14));
        jLabel1.setText("RIF");

        jLabel2.setFont(new java.awt.Font("Droid Sans", 1, 14));
        jLabel2.setText("TELEFONO");

        jLabel3.setFont(new java.awt.Font("Droid Sans", 1, 14));
        jLabel3.setText("NOMBRE");

        jLabel4.setFont(new java.awt.Font("Droid Sans", 1, 14));
        jLabel4.setText("CORREO");

        jLabel5.setFont(new java.awt.Font("Droid Sans", 1, 14));
        jLabel5.setText("DIRECCION");

        jLabel6.setFont(new java.awt.Font("Droid Sans", 1, 18));
        jLabel6.setText("REGISTRO DE CLIENTES");

        jPanel1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 482, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 8, Short.MAX_VALUE)
        );

        botonGuardar.setText("Guardar");
        botonGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonGuardarActionPerformed(evt);
            }
        });
        botonGuardar.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                botonGuardarKeyPressed(evt);
            }
        });

        botonGenerar.setText("Generar Solicitud ");
        botonGenerar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonGenerarActionPerformed(evt);
            }
        });

        botonSalir.setText("Salir");
        botonSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonSalirActionPerformed(evt);
            }
        });

        jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/sst/imagenes/registro.png"))); // NOI18N

        botonBuscar.setText("Verificar");
        botonBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonBuscarActionPerformed(evt);
            }
        });

        jButton1.setText("Buscar");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        botonActualizar.setText("Actualizar");
        botonActualizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonActualizarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addGap(131, 131, 131)
                .addComponent(jLabel6)
                .addContainerGap(151, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(29, 29, 29)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addComponent(botonGuardar, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(botonActualizar, javax.swing.GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(botonGenerar, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(botonSalir, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(8, 8, 8))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1)
                            .addComponent(jLabel2)
                            .addComponent(jLabel4)
                            .addComponent(jLabel3))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(textNombre, javax.swing.GroupLayout.DEFAULT_SIZE, 332, Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(textCorreo, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(textTelefono, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 77, Short.MAX_VALUE)
                                .addComponent(jLabel7))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(textRif, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(botonBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(textDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, 326, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(35, 35, 35))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel6)
                .addGap(3, 3, 3)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textRif, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1)
                    .addComponent(botonBuscar)
                    .addComponent(jButton1))
                .addGap(15, 15, 15)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(textTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(textCorreo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jLabel7))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(textDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(botonGuardar)
                    .addComponent(botonSalir)
                    .addComponent(botonGenerar)
                    .addComponent(botonActualizar))
                .addContainerGap(65, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void botonSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonSalirActionPerformed
        this.dispose();
    }//GEN-LAST:event_botonSalirActionPerformed
    public void cerrar() {
        this.dispose();
    }
    private void botonGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonGuardarActionPerformed
        try {
            //String rif = textRif.getText();
            boolean datoValido = false;
            String rif = textRif.getText();
            String nombre = textNombre.getText();
            String telefono = textTelefono.getText();
            String correo = textCorreo.getText();
            String direccion = textDireccion.getText();
            int seleccion = 0;
            Statement consulta1 = con.createStatement();
            ResultSet busqueda = consulta1.executeQuery("SELECT rif FROM cliente WHERE rif =  '" + rif + "'");

            if (busqueda.next()) {
                datoValido = true;
            }
            if (datoValido != false) {
                // int seleccion1=JOptionPane.showOptionDialog(this,"Cliente ya Registrado / ¿Desea gen solicitud?","Seleccione su Opcion",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null,new Object[]{"Si","No"},"Si");
                //JOptionPane.showMessageDialog(this,"Cliente ya registrado","Advertencia",JOptionPane.WARNING_MESSAGE);
                seleccion = JOptionPane.showOptionDialog(this, "Desea actualizar", "Advertencia", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, new Object[]{"Si", "No"}, "Si");
            }
            if (seleccion == 0) 
                actualizarCliente();
                //System.out.print("actualizado");
            
            consulta = con.prepareStatement("INSERT INTO cliente VALUES(?,?,?,?,?)");
            consulta.setString(1, rif);
            consulta.setString(2, nombre);
            consulta.setString(3, telefono);
            consulta.setString(4, direccion);
            consulta.setString(5, correo);
            consulta.executeUpdate();
            textRif.setEnabled(true);
            textNombre.setText("");
            textCorreo.setText("");
            textDireccion.setText("");
            textTelefono.setText("");
            textNombre.setEnabled(false);
            textTelefono.setEnabled(false);
            textDireccion.setEnabled(false);
            textCorreo.setEnabled(false);


            JOptionPane.showMessageDialog(this, "Cliente Registrado", "Guardado Exitoso", JOptionPane.INFORMATION_MESSAGE);
            this.dispose();
        } catch (SQLException ex) {
            // JOptionPane.showMessageDialog(this,"Verifique datos introducidos","ERROR",JOptionPane.ERROR_MESSAGE);
        }




    }//GEN-LAST:event_botonGuardarActionPerformed

    public void actualizarCliente() {
        String rif = textRif.getText();
        String nombre = textNombre.getText();
        String telefono = textTelefono.getText();
        String correo = textCorreo.getText();
        String direccion = textDireccion.getText();
        try {
            consul = con.prepareStatement("UPDATE cliente SET rif='" + rif + "',nombreCliente='" + nombre + "',telefono='" + telefono + "',direccion='" + direccion + "',correo='" + correo + "' WHERE rif like '" + rif + "'");
            consul.executeUpdate();
            System.out.print(rif + " actualizado");
        } catch (SQLException ex) {
            Logger.getLogger(RegistroCliente.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    private void botonGuardarKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_botonGuardarKeyPressed
    }//GEN-LAST:event_botonGuardarKeyPressed

    private void botonBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonBuscarActionPerformed

        try {

            boolean datoValido = false;
            //ConexionDB conexion = new ConexionDB();
            // PreparedStatement consulta1;
            String rif = textRif.getText();
            String nombre = textNombre.getText();
            String telefono = textTelefono.getText();
            String correo = textCorreo.getText();
            String direccion = textDireccion.getText();
            Statement consulta1 = con.createStatement();
            ResultSet busqueda = consulta1.executeQuery("SELECT rif FROM cliente WHERE rif = '" + rif + "'");
            if (busqueda.next()) {
                datoValido = true;
            }

            if (datoValido != false) {
                ResultSet consulta2 = consulta1.executeQuery("SELECT * FROM cliente WHERE rif = '" + rif + "'");
                while (consulta2.next()) {

                    rif = consulta2.getString("rif");
                    nombre = consulta2.getString("nombreCliente");
                    telefono = consulta2.getString("telefono");
                    direccion = consulta2.getString("direccion");
                    correo = consulta2.getString("correo");
                }
                textRif.setText(rif);
                textNombre.setText(nombre);
                textTelefono.setText(telefono);
                textDireccion.setText(direccion);
                textCorreo.setText(correo);
                int seleccion = JOptionPane.showOptionDialog(this, "Cliente Registrado / ¿Desea generar solicitud?", "Seleccione su Opcion", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, new Object[]{"Si", "No"}, "Si");
                /*aqui va codigo para generar solicitud*/
                if (seleccion != 1) {
                    GenerarSolicitud gsolicitud = new GenerarSolicitud(null, true);
                    this.dispose();
                    gsolicitud.setVisible(true);

                }

            } else {
                textRif.setEnabled(false);
                textNombre.setEnabled(true);
                textTelefono.setEnabled(true);
                textDireccion.setEnabled(true);
                textCorreo.setEnabled(true);
            }

        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(this, "Verifique datos introducidos", "ERROR", JOptionPane.ERROR_MESSAGE);
        }
    }//GEN-LAST:event_botonBuscarActionPerformed

    private void botonGenerarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonGenerarActionPerformed
        
        GenerarSolicitud gsolicitud = new GenerarSolicitud(null, true);
        this.dispose();
        gsolicitud.setVisible(true);
        
    }//GEN-LAST:event_botonGenerarActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
       
        
        Principal b = new Principal();
        BuscaCliente a = new BuscaCliente(b, true);
        //this.dispose();
        a.setVisible(true);
      


 this.dispose();
    }//GEN-LAST:event_jButton1ActionPerformed

    private void botonActualizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonActualizarActionPerformed
       textCorreo.setEnabled(true);
         textDireccion.setEnabled(true);
      textNombre.setEnabled(true);
      textTelefono.setEnabled(true);
        try {
         
     String rif=textRif.getText();
     String nombre=textNombre.getText();
     String telefono=textTelefono.getText();
     String direccion=textDireccion.getText();
     String correo = textCorreo.getText();
            PreparedStatement consulta3 = con.prepareStatement("UPDATE cliente SET rif=?,nombreCliente=?,telefono=?,direccion=?,correo=? WHERE rif like'"+rif+"'");
            consulta3.setString(1,rif);
            consulta3.setString(2,nombre);
            consulta3.setString(3,telefono);
            consulta3.setString(4,direccion);
            consulta3.setString(5,correo);

            consulta3.executeUpdate();
             JOptionPane.showMessageDialog(this,"Actualizacion Exitosa","",JOptionPane.INFORMATION_MESSAGE);

        } catch (SQLException ex) {
             JOptionPane.showMessageDialog(this,"Verifique que los datos introducidos son correctos","ERROR",JOptionPane.ERROR_MESSAGE);
        } catch(NumberFormatException e){
        JOptionPane.showMessageDialog(this,"Verifique que los datos introducidos son correctos","ERROR",JOptionPane.ERROR_MESSAGE);
    }
    }//GEN-LAST:event_botonActualizarActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                try {
                    RegistroCliente dialog = new RegistroCliente(new javax.swing.JFrame(), true);
                    dialog.addWindowListener(new java.awt.event.WindowAdapter() {

                        @Override
                        public void windowClosing(java.awt.event.WindowEvent e) {
                            System.exit(0);
                        }
                    });
                    dialog.setVisible(true);
                } catch (SQLException ex) {
                    Logger.getLogger(RegistroCliente.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton botonActualizar;
    private javax.swing.JButton botonBuscar;
    private javax.swing.JButton botonGenerar;
    private javax.swing.JButton botonGuardar;
    private javax.swing.JButton botonSalir;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    public javax.swing.JTextField textCorreo;
    public javax.swing.JTextField textDireccion;
    public javax.swing.JTextField textNombre;
    public javax.swing.JTextField textRif;
    public javax.swing.JTextField textTelefono;
    // End of variables declaration//GEN-END:variables
}
